#include "PositionBuffer.h"

#include "VertexFactory.h"

namespace Alice
{
    CGIBuffer* PositionBuffer::CreateRHIBuffer(CGICommandListBase& inCGICmdList)
    {
        return RenderResource::CreateRHIBuffer(inCGICmdList,mVertexData,mVertexCount,EBufferUsageFlags::Static | EBufferUsageFlags::ShaderResource,TEXT("VBO"));
    }
    void PositionBuffer::InitRHI(CGICommandListBase& inCGICmdList)
    {
        mCGIBuffer=CreateRHIBuffer(inCGICmdList);
    }
    void PositionBuffer::BindPositionVertexBuffer(const VertexFactory* VertexFactory, FStaticMeshDataType& inOutStaticMeshDataType) const
    {
        inOutStaticMeshDataType.PositionComponent=FVertexStreamComponent(this,0,sizeof(Vector3f),VET_Float3);
    }

}
